package com.kanqiubao.kq.activity.user;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.kanqiubao.kq.R;
import com.kanqiubao.kq.activity.BaseActivity;
import com.kanqiubao.kq.utils.AppConfig;

public class LoginMainActivity extends BaseActivity<String> {
    @Override
    protected void onActivityCreate(Bundle savedInstanceState) {
        AppConfig.setViewLayoutViewHeight(findViewById(R.id.img),500,750,AppConfig.getScreenWidth());
    }

    @Override
    protected int getActivitylayout() {
        return R.layout.login_main_layout;
    }

    @Override
    protected String getTitleText() {
        return null;
    }

    @Override
    public void click(View v) {
        switch (v.getId()) {
            case R.id.select_1:
                findViewById(R.id.img_code_id).setVisibility(View.GONE);
                findViewById(R.id.yzm_code_id).setVisibility(View.GONE);
                findViewById(R.id.pwd_rot).setVisibility(View.VISIBLE);
                findViewById(R.id.forg).setVisibility(View.VISIBLE);
                ((TextView) findView(R.id.select_1)).setBackgroundColor(getResources().getColor(R.color.tran));
                ((TextView) findView(R.id.select_2)).setBackgroundColor(getResources().getColor(R.color.fg_list_color));
                ((TextView) findView(R.id.select_1)).setTextColor(getResources().getColor(R.color.sc_list_txt_color2));
                ((TextView) findView(R.id.select_2)).setTextColor(getResources().getColor(R.color.sc_list_txt_color1));
                break;
            case R.id.select_2:
                findViewById(R.id.img_code_id).setVisibility(View.VISIBLE);
                findViewById(R.id.yzm_code_id).setVisibility(View.VISIBLE);
                findViewById(R.id.pwd_rot).setVisibility(View.GONE);
                findViewById(R.id.forg).setVisibility(View.GONE);
                ((TextView) findView(R.id.select_1)).setBackgroundColor(getResources().getColor(R.color.fg_list_color));
                ((TextView) findView(R.id.select_2)).setBackgroundColor(getResources().getColor(R.color.tran));
                ((TextView) findView(R.id.select_1)).setTextColor(getResources().getColor(R.color.sc_list_txt_color1));
                ((TextView) findView(R.id.select_2)).setTextColor(getResources().getColor(R.color.sc_list_txt_color2));
                break;
            case R.id.reg:
                startMyActivity(RegisterActivity.class);
                break;
            case R.id.forg:
                startMyActivity(ForgetActivity.class);
                break;
        }
        super.click(v);
    }
}
